{% extends "site.html" %}
{# база с деревом #}
{% block appstylesheet %}{% load fm_media %}{% fileman_media_prefix %}css/fm.css{% endblock %}
{% block appjs %}<script type="text/javascript" src="{% fileman_media_prefix %}js/fm.js"></script>{% endblock %}
{% block extrajs %}
  
<link rel="stylesheet" type="text/css" href="{% fileman_media_prefix %}css/fm-tree.css"> 
<script type="text/javascript" src="{% load media %}{% media_prefix %}js/jquery152.js "></script> 
<script type="text/javascript" src="{% fileman_media_prefix %}js/fm-tree.js"></script> 
 
{% endblock %}

{% block globalconteiner %}
<div id="title">
  <h1>File manager</h1>
</div>
<div id="content-main">
<div id="content-left">
  <div class="toolbar">
    <ul>
      <li><a href="/">Свернуть все</a></li>
      <li><a href="catalog/">Развернуть все</a></li>
    </ul>
  </div>

    <div class="main-treeview treeview">   
        <ul>
            
            {% include 'treeview_node.html' %}
        
        
        
        
            {% comment %}
            {% for item in dirtree %}
                {% for i in item.level_div %}</ul></li>  {% endfor %}
                {% if item.child == 0 %}
                  <li class="sc"><div><p>
                  {#<a href="{% url ls_path item.path %}" id="ti_{{item.id}}">#}
                  
                  <a href="#" onclick="return load_directory('{% url ajax_ls_path item.path %}')">
                  
                  <img src="{% fileman_media_prefix %}img/treefolder.png" class="i" />{{ item.name }}</a>
                  </p></div></li>                
                {% else %}
                  <li class="sc"><div><p>
                  <a href="#" id="tn_%s" class="sc" onclick="return UnHide(this, '{% url get_dirtree_node item.path %}')"><img src="{% fileman_media_prefix %}img/minus.gif" /></a>
                  {#<a href="{% url ls_path item.path %}">#}
                  
                  <a href="#" onclick="return load_directory('{% url ajax_ls_path item.path %}')">
                  
                  <img src="{% fileman_media_prefix %}/img/treefolder.png" class="i" />{{ item.name }}</a>
                  </p></div><ul>
                {% endif %}  
            {% endfor %}  
            {% endcomment %}
        </ul>
        <script language="JavaScript">                
        
        //UnHideOpenNodes();
        
        {% comment %}
        {% for item in category_path %}
        UnHideNodeItem('tn_'+{{item.id}});
        {% endfor %} 
        {% endcomment %} 
        
        
        var selectitem = document.getElementById('ti_{{ currentcategory }}');
        if(selectitem) 
            selectitem.style.fontWeight = 'bold'; 



        
       </script>    
    </div>
</div>
{% block content_right %}
{% endblock %}
</div>
{% endblock %}